﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.Master" AutoEventWireup="true" CodeBehind="ArticleAdd.aspx.cs" Inherits="VK.Casemeet.Web.Admin.Articles.ArticleAdd" %>

<%@ Register src="../Controls/ImgControl.ascx" tagname="ImgControl" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentHead" runat="server">
    <script type="text/javascript" src="/Scripts/ajaxupload.js"></script>
    <link rel="stylesheet" type="text/css" href="/Kindeditor/themes/default/default.css" />
    <link rel="stylesheet" type="text/css" href="/Kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript" charset="utf-8" src="/Kindeditor/kindeditor-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript">
        KindEditor.ready(function (K) {
            var editor1 = K.create('#txtContent', {
                cssPath: '/Kindeditor/plugins/code/prettify.css',
                uploadJson: '/PageHandler/UploadJson.ashx',
                fileManagerJson: '/PageHandler/FileManagerJson.ashx',
                allowFileManager: true,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[id=mainForm]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[id=mainForm]')[0].submit();
                    });
                    $('.butSave').click(function () {
                        self.sync();
                    });
                }
            });
            prettyPrint();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentBody" runat="server">
    <div class="bodyContent divBody">
        <div class="divDetailOper">
            <asp:LinkButton ID="butSave" runat="server" CssClass="butSave" onclick="butSave_Click" OnClientClick="return validator.form();">保存信息</asp:LinkButton>
            <a class="butBack" href="ArticleList.aspx">返回列表</a>
        </div>
        <div class="divEdit" style="width:74%;margin:10px 0 0 1%;_margin:10px 0 0 0.5%;height:auto;">
            <div class="title">基本信息</div>
            <div class="content">
                <table cellpadding="0" cellspacing="0" class="tableLeftEdit">
                    <tbody>
                        <tr>
                            <th>文章分类：</th>
                            <td><asp:DropDownList ID="ddlCategoryID" runat="server" CssClass="selectddl {min:1, messages:{min:'请选择分类'}}" Width="40%"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <th>图片：</th>
                            <td><uc1:ImgControl ID="newsPhoto1" runat="server" defaultImgUrl="Null.jpg" folderName="Logos" imgHeight="94" imgWidth="144" tipHeight="94" tipWidth="144" /></td>
                        </tr>
                        <tr>
                            <th>标题：</th>
                            <td><asp:TextBox ID="txtTitle" runat="server" CssClass="inputText {required:true, stringMaxLength:200}" Width="80%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <th>作者：</th>
                            <td><asp:TextBox ID="txtAuthor" runat="server" CssClass="inputText {required:true, stringMaxLength:40}" Width="40%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <th>来源：</th>
                            <td><asp:TextBox ID="txtSource" runat="server" CssClass="inputText {required:true, stringMaxLength:40}" Width="40%"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <th>标签：</th>
                            <td>
                                <asp:TextBox ID="txtTag" runat="server" CssClass="inputText {stringMaxLength:200}" Width="99%"></asp:TextBox>
                                <br />（多个标签请用","分割）
                            </td>
                        </tr>
                        <tr>
                            <th>详细内容：</th>
                            <td><textarea id="txtContent" name="txtContent" style="width:100%;height:370px;"></textarea></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="divEdit" style="width:23%;margin:10px 0 0 1%;_margin:10px 0 0 0.5%;height:auto;">
            <div class="title">系统信息</div>
            <div class="content">
                <table cellpadding="0" cellspacing="0" class="tableRightEdit">
                    <tbody>
                        <tr><th>编辑人：</th></tr>
                        <tr><td><asp:Label ID="lbEditor" runat="server" Text="管理员"></asp:Label></td></tr>
                        <tr><th>创建时间：</th></tr>
                        <tr><td><asp:TextBox ID="txtCreated" runat="server" CssClass="inputText" Width="80%" onclick="return showCalendar(this.id, 'y-m-d');"></asp:TextBox></td></tr>
                        <tr><th>点击：</th></tr>
                        <tr><td><asp:TextBox ID="txtHits" runat="server" CssClass="inputText required digits" Width="80%" Text="0"></asp:TextBox></td></tr>
                        <tr><th>启用：</th></tr>
                        <tr><td><asp:CheckBox ID="chkIsEnable" runat="server" Checked="true" /></td></tr>
                     </tbody>
                </table>
            </div>
        </div>
        <div class="clear f0" style="height:10px; width:100%"></div>
        <div class="clear divDetailOper">
            <asp:LinkButton ID="LinkButton1" runat="server" CssClass="butSave" onclick="butSave_Click" OnClientClick="return validator.form();">保存信息</asp:LinkButton>
            <a class="butBack" href="ArticleList.aspx">返回列表</a>
        </div>
        <div class="clear f0" style="height:20px; width:100%"></div>
    </div>
</asp:Content>
